//
//  NSString+GGJson.m
//  ocdemo
//
//  Created by JIENING ZHANG on 2019/6/11.
//  Copyright © 2019 JIENING ZHANG. All rights reserved.
//

#import "NSString+GGJson.h"

@implementation NSString(GGJson)

- (id)ggJsonObj {
    if(self.length == 0) {
        return nil;
    }
    
    NSError *err;
    
    NSData *jsonData = [self dataUsingEncoding:NSUTF8StringEncoding];
    //NSLog(@"jsonArrData length: %lu", [jsonArrData length]);
    
    id jsonObj = [NSJSONSerialization JSONObjectWithData:jsonData options:NSJSONReadingMutableContainers error:&err];
    
    return jsonObj;
}
@end
